package com.zx.cloud.controller.client;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.domain.Log;
import com.zx.cloud.domain.Resource;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.util.Page;

import feign.Headers;

/**
 * @author Alex
 */
@FeignClient(name = ResourceClient.SERVICE_ID, fallback = ResourceClientFallback.class)
public interface ResourceClient {

	/**
	 * eureka service name
	 */
	String SERVICE_ID = "trade-provider";

	
	
	@Headers("X-Auth-Token:{X-Auth-Token}")
	@RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX + "/resource/update", method = RequestMethod.POST)
	ObjectDataResponse<Object> update(Resource resource);
	  
    @Headers("X-Auth-Token:{X-Auth-Token}")
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/resource/find", method = RequestMethod.POST)
	ObjectDataResponse<Object> findAllSource();
    
    @Headers("X-Auth-Token:{X-Auth-Token}")
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/resource/add", method = RequestMethod.POST)
	ObjectDataResponse<Object> insert(Resource resource);
    
    @Headers("X-Auth-Token:{X-Auth-Token}")
  	@RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/resource/leftMenu", method = RequestMethod.POST)
  	ObjectDataResponse<List<Resource>> leftMenu();
    
    @Headers("X-Auth-Token:{X-Auth-Token}")
  	@RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/resource/delete", method = RequestMethod.POST)
	ObjectDataResponse<Object> delete(Resource resource);
    
    
}
